﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Users/Usuario.Master" AutoEventWireup="true"
    CodeBehind="WizardCadastro.aspx.cs" Inherits="Juntae.WizardCadastro" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style7
        {
            text-align: center;
        }
        .style8
        {
            font-family: Verdana;
            font-size: 11px;
            text-align: right;
            color: white;
        }
        .style9
        {
            font-family: Verdana;
            font-size: 11px;
        }
    </style>
    <script type="text/javascript">
        function SelectAll(id) {
            var grid = document.getElementById("<%# gridFacebookFriends.ClientID %>");
            var cell;
            if (grid.rows.length > 0) {
                for (i = 1; i < grid.rows.length; i++) {
                    cell = grid.rows[i].cells[0];
                    for (j = 0; j < cell.childNodes.length; j++) {
                        if (cell.childNodes[j].type == "checkbox") {
                            cell.childNodes[j].checked = document.getElementById(id).checked;
                        }
                    }
                }
            }
        }
    </script>
    <script type = "text/javascript">
        function clientuploadComplete(sender) {
            window.location = "Default.aspx";
        }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="wizard">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
                    DisplayAfter="100">
                    <ProgressTemplate>
                        <div id="invite_friend_progress">
                            <asp:Image ID="img_progress" runat="server" ImageUrl="~/img/progress.gif" CssClass="img_progress" />
                        </div>
                    </ProgressTemplate>
                </asp:UpdateProgress>
                <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
                    <asp:View ID="Step1" runat="server">
                        <div id="passo1" class="passos">
                            <img alt="" src="../img/step1_1.png" />
                            <img alt="" src="../img/step2_0.png" class="img_step2" />
                            <img alt="" src="../img/step3_0.png" class="img_step3" />
                            <div id="titulo_step1">
                                <p class="step_titulo">
                                    Seus amigos já estão no Juntaê ?<br />
                                </p>
                                <p class="step_subtitulo">
                                    Convide seus amigos para participarem do Juntaê.</p>
                                <asp:UpdatePanel ID="UpdatePanelStatus" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <p style="text-align: center">
                                            <asp:Label ID="lblFacebookStatus" runat="server" Style="color: #FFFFFF; font-weight: 700;
                                                font-family: Verdana; font-size: 11px;" Text="Label" Visible="False"></asp:Label>
                                        </p>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                                <div class="msg_list">
                                    <p class="msg_head">
                                        <img src="../img/facebook-icon.png" alt="Facebook" class="facebook_icon" />
                                        <label id="lblFacebook">
                                            Facebook</label>
                                        <img src="../img/linha_wizard.png" alt="" class="linha_wizard1" />
                                    </p>
                                    <div class="msg_body">
                                        <asp:UpdatePanel ID="UpdatePanelFacebookLogin" runat="server" UpdateMode="Conditional">
                                            <ContentTemplate>
                                                <table class="style1">
                                                    <tr>
                                                        <td class="style7">
                                                            <fb:login-button size="medium" length="short" v="2" perms="read_friendlists,publish_stream"
                                                                onlogin="fb_login()"></fb:login-button>
                                                            <div id="fb-root">
                                                            </div>
                                                            <script type="text/javascript" src="http://static.ak.fbcdn.net/connect/en_US/core.js"></script>
                                                            <script type="text/javascript">
                                                                FB.init({ appId: '204094279626024', status: true, cookie: false, xfbml: true });
                                                                function fb_login() {
                                                                    FB.login(function (response) {
                                                                        if (response.session) {
                                                                            if (response.perms) {
                                                                                window.location.href = "WizardCadastro.aspx?access_token=" + response.session.access_token
                                                                            } else {
                                                                                window.location.href = "WizardCadastro.aspx?access_token=" + response.session.access_token
                                                                            }
                                                                        }
                                                                    }, { perms: 'read_friendlists,publish_stream' });
                                                                }
                                                            </script>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </div>
                                    <p class="msg_head">
                                        <img src="../img/orkut-icon.png" alt="Orkut" class="facebook_icon" />
                                        <label id="lblOrkut">
                                            Orkut</label>
                                        <img src="../img/linha_wizard.png" alt="" class="linha_wizard2" /></p>
                                    <div class="msg_body">
                                        orem ipsum dolor sit amet, consectetuer adipiscing elit orem ipsum dolor sit amet,
                                        consectetuer adipiscing elit
                                    </div>
                                    <p class="msg_head">
                                        <img src="../img/hotmail-icon.png" alt="Hotmail" class="facebook_icon" />
                                        <label id="lblHotmail">
                                            Hotmail</label>
                                        <img src="../img/linha_wizard.png" alt="" class="linha_wizard3" /></p>
                                    <div class="msg_body">
                                        orem ipsum dolor sit amet, consectetuer adipiscing elit orem ipsum dolor sit amet,
                                        consectetuer adipiscing elit
                                    </div>
                                </div>
                            </div>
                        </div>
                        <asp:LinkButton ID="lnkPularEtapa1" runat="server" CssClass="lnkPularEtapa" OnClick="lnkPularEtapa_Click">Pular esta etapa</asp:LinkButton>
                    </asp:View>
                    <asp:View ID="Step1_2" runat="server">
                        <div id="friends" class="passos">
                            <img alt="" src="../img/step1_1.png" />
                            <img alt="" src="../img/step2_0.png" class="img_step2" />
                            <img alt="" src="../img/step3_0.png" class="img_step3" />
                            <div id="passos">
                                <p class="step_titulo_friends">
                                    Selecione os amigos que deseja
                                    <br />
                                    convidar para o Juntaê.<br />
                                </p>
                                <p class="step_subtitulo_friends">
                                    Esses amigos receberão um convite que será enviado para o Facebook</p>
                                <div id="gridViewFacebook">
                                    <asp:GridView ID="gridFacebookFriends" runat="server" AutoGenerateColumns="False"
                                        CssClass="gridFacebookFriends" DataKeyNames="id" EnableModelValidation="True"
                                        Height="300px" Width="450px" OnRowDataBound="gridFacebookFriends_RowDataBound"
                                        BorderStyle="None" GridLines="Horizontal">
                                        <Columns>
                                            <asp:TemplateField>
                                                <EditItemTemplate>
                                                    <asp:CheckBox ID="chkFriend" runat="server" />
                                                </EditItemTemplate>
                                                <HeaderTemplate>
                                                    <asp:CheckBox ID="chkAll" runat="server" />
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="chkFriend" runat="server" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("picture") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("picture") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="name" />
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </div>
                        </div>
                        <asp:LinkButton ID="LinkButton3" runat="server" CssClass="lnkPularEtapa" OnClick="lnkPularEtapa_Click">Pular esta etapa</asp:LinkButton>
                        <asp:ImageButton ID="btnConvidar" runat="server" ImageUrl="~/img/btnConvidar.png"
                            CssClass="btnConvidar" OnClick="btnConvidar_Click" />
                        <asp:LinkButton ID="LinkButton4" runat="server" CssClass="lnkVoltarEtapa" OnClick="lnkVoltarEtapa_Click">Voltar</asp:LinkButton>
                    </asp:View>
                    <asp:View ID="Step2" runat="server">
                        <div id="passo2" class="passos">
                            <img alt="" src="../img/step1_0.png" />
                            <img alt="" src="../img/step2_1.png" class="img_step2" />
                            <img alt="" src="../img/step3_0.png" class="img_step3" />
                            <div id="titulo_step2">
                                <p class="step_titulo">
                                    Preencha as informações sobre o seu perfil.<br />
                                </p>
                                <p class="step_subtitulo">
                                    Essas informações complementam o seu perfil no Juntaê</p>
                            </div>
                            <table class="style1">
                                <tr>
                                    <td class="style8">
                                        Página da Web:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtSite" runat="server" CssClass="style9"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                            ControlToValidate="txtSite" ErrorMessage="*" ForeColor="White"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style8">
                                        Escolaridade:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtEscolaridade" runat="server" CssClass="style9"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                            ControlToValidate="txtEscolaridade" ErrorMessage="*" ForeColor="White"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style8">
                                        Cidade:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtCidade" runat="server" CssClass="style9"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                            ControlToValidate="txtCidade" ErrorMessage="*" ForeColor="White"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style8">
                                        Paixões:
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtPaixoes" runat="server" CssClass="style9"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                            ControlToValidate="txtPaixoes" ErrorMessage="*" ForeColor="White"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <asp:LinkButton ID="lnkVoltarEtapa" runat="server" CssClass="lnkVoltarEtapaStep2" 
                            OnClick="lnkVoltarEtapa_Click" CausesValidation="False">Voltar</asp:LinkButton>
                        <asp:LinkButton ID="lnkProximo" runat="server" CssClass="lnkProximoStep2" 
                            OnClick="lnkProximo_Click">Próximo</asp:LinkButton>
                            <asp:LinkButton ID="lnkPularEtapa2" runat="server" CssClass="lnkPularEtapaStep2" 
                            OnClick="lnkPularEtapa_Click" CausesValidation="False">Pular esta etapa</asp:LinkButton>
                    </asp:View>
                    <asp:View ID="Step3" runat="server">
                        <div id="passo3" class="passos">
                            <img alt="" src="../img/step1_0.png" />
                            <img alt="" src="../img/step2_0.png" class="img_step2" />
                            <img alt="" src="../img/step3_1.png" class="img_step3" />
                            <div id="titulo_step3">
                                <p class="step_titulo">
                                    Envie uma foto para o seu perfil.<br />
                                </p>
                                <div id="foto_perfil">
                                    <img src="../img/back_nophoto_white.png" alt="foto" class="foto_perfil" />
                                    <br /><br />
                                    <div id="uploadFoto">                                        
                                            <asp:AsyncFileUpload ID="foto_upload" runat="server" PersistFile="True" 
                                                Width="300px" UploaderStyle="Traditional" CssClass="FileUploadClass" 
                                                EnableViewState="False" Font-Names="Verdana" Font-Size="11px" ForeColor="White" 
                                                onuploadedcomplete="foto_upload_UploadedComplete" 
                                                onuploadedfileerror="foto_upload_UploadedFileError" OnClientUploadComplete="clientuploadComplete" />
                                                <asp:ImageButton ID="img_upload_foto" runat="server" ImageUrl="~/img/btnEnviarFoto.png" CssClass="img_upload_foto"/>
                                </div>
                            </div>
                        </div>
                        <asp:LinkButton ID="lnkFinalizar" runat="server" CssClass="lnkFinalizar" OnClick="lnkFinalizar_Click">Finalizar</asp:LinkButton>
                        <asp:LinkButton ID="lnkVoltarEtapaStep3" runat="server" CssClass="lnkVoltarEtapaStep3" OnClick="lnkVoltarEtapa_Click">Voltar</asp:LinkButton>
                            <asp:Label ID="lblStatusFoto" runat="server" Text="Label" ForeColor="White" 
                                Visible="False" CssClass="lblStatusFoto"></asp:Label>
                    </asp:View>
                </asp:MultiView>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
